import { IsIn, IsOptional } from 'class-validator';
import { Transform } from 'class-transformer';

export class CaptchaDto {
  @IsOptional()
  @Transform(({ value }) => value ?? 'text')
  @IsIn(['text', 'math'], { message: 'type 参数必须是 "text" 或 "math"' })
  readonly type: string;
}
